package com.cy.pj.service;

import com.cy.pj.notice.pojo插件lombok注解代替set和get方法.SysNotice;
import com.cy.pj.notice.service.impl.SysNoticeService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;
@SpringBootTest
public class SysNoticeServiceTests业务层单元测试 {
@Autowired
private SysNoticeService sysNoticeService;

@Test
void testFindNotices(){
    SysNotice sysNotice=new SysNotice();
    sysNotice.setTitle("%MY%");
    sysNotice.setStatus("0");
    List<SysNotice> list= sysNoticeService.findNotice(sysNotice);
//jdk8之前的写法
     for(SysNotice n:list){
         System.out.println(n);
       }

    //JDK8 的遍历新写法--箭头函数迭代
   //list.forEach(item->System.out.println(item));


}
}
